using System;
using CodeAngel.Domain.Framework;

namespace CodeAngel.Domain
{
	public partial class User_PermissionCollection
	{

        #region Find

        /// <summary>
        /// Find the User_Permission entity for the identified Permission.  Null is returned if one
        /// is not found.
        /// </summary>
        public User_Permission Find(Permission thisPermission)
        {
            foreach (User_Permission ThisUserPermission in this)
                if (ThisUserPermission.Permission.ID == thisPermission.ID) return ThisUserPermission;
            return null;
        }

        #endregion
	}
}

